import request from '@/utils/request'

const AuthAPI = {
    login(data: any) {
        return request<any, LoginResult>({
            url: '/api/auth',
            method: 'post',
            data: data
        });
    }
}

export default AuthAPI;

export interface LoginFormData {
    username: string;
    password: string;
}

export interface LoginResult {
    access_token: string;
    token_type: string;
}